import {sendRequest, upload} from "./http.js"

export default {
	
  upload: function (filePath, config = {}) {
	return upload('/infra/file/upload',filePath,config.filename,config.formData,config.header)    
  },
  uploadIdentifyImages: function (filePath, config = {}) {
  	return upload('/capacity/common/identifyImages',filePath,config.filename,config.formData,config.header)    
  },

  download: function (params) {
    return sendRequest({
      url: '/file/download',
      method: 'get',
      params: params
    })
  },

  uploadFile: function (filePath, config = {}) {
	return upload('/infra/file/upload?path=',filePath)      
  },
  downloadFile: function (params) {
    return sendRequest({
      url: '/file/downloadFile',
      method: 'get',
      params: params
    })
  }
}
